var webPath = "";
$(document).ready(function(){
	webPath = $("#webPath").val();
	var msg = $("#message").val();
	if(msg != ""){
		alert(msg);
	}
});

function login(){
	var loginName = string.trim($("#loginName").val());
	var password = string.trim($("#password").val());
	var validateCode = string.trim($("#validateCode").val());
	
	if(loginName == ""){
		alert("请输入账号！");
		$("#loginName").focus();
		return false;
	}
	if(password == ""){
		alert("请输入密码！");
		$("#password").focus();
		return false;
	}
	if(validateCode == ""){
		alert("请输入验证码！");
		$("#validateCode").focus();
		return false;
	}
}

function changeValidateCode(obj){
	var timenow = new Date().getTime();
	obj.src = webPath+"/admin/rand?d="+timenow;
}